package main

import (
	"fmt"
	"log"
	"os"

	"gitee.com/usmile/goping/internal/icmp"
)

func main() {
	if len(os.Args) < 3 {
		fmt.Printf("Usage: %s -1 <IP Address>\n", os.Args[0])
		os.Exit(1)
	}

	ipAddress := os.Args[2]
	if err := icmp.SendICMPRequest(ipAddress); err != nil {
		log.Fatalf("Error: %v\n", err)
	}
}
